/**
  * @desc to remove request body parameters
*/

const removeRequestBodyParams = keys => (req, res, next) => {
  const keysToRemove = [].concat(keys)
  keysToRemove.forEach(keyToRemove => delete req.body[keyToRemove])
  return next()
}

module.exports = removeRequestBodyParams
